Column

COVID-19 Cumulative Incidence Rate from March - September 2020 by ZCTA

Column

COVID-19 Cumulative Death Rate from March - September 2020 by ZCTA

Proportion of SHSAT Offers in 2020 by ZCTA

---
title: "Map Visualizations"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    source_code: embed
 
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(plotly)
library(rgdal)
library(sf)
library(viridis)

theme_set(theme_minimal() + theme(legend.position = "bottom"))
options(
  ggplot2.continuous.colour = "viridis",

  ggplot2.continuous.fill = "viridis"
)
scale_colour_discrete = scale_colour_viridis_d
scale_fill_discrete = scale_fill_viridis_d

covid_death_sdf1 = st_read("shapefiles/deathrate_map1.shp")
```

Column {data-width=600}
-----------------------------------------------------------------------

### COVID-19 Cumulative Incidence Rate from March - September 2020 by ZCTA
    
```{r, echo = FALSE}
ggplotly(
  ggplot(covid_death_sdf1) +
  geom_sf(aes(fill = incidence)) +
  theme(legend.text = element_text(size = 4), 
        legend.position = 'right', axis.text.x = element_text(angle = 45)) +
  labs(
    title = "Covid-19 Cumulative Incidence\nfrom March - September 2020 by ZCTA",
    x = "Latitude",
    y = "Longitude", fill = "Covid-19 Incidence\n (Cases/100,000)")) %>% 
  layout(xaxis = list(autorange = TRUE),
         yaxis = list(autorange = TRUE))
```


Column {data-width=500}
-----------------------------------------------------------------------
### COVID-19 Cumulative Death Rate from March - September 2020 by ZCTA

```{r, echo = FALSE}
ggplotly(
  ggplot(covid_death_sdf1) +
    geom_sf(aes(fill = cum_death)) +
    theme(legend.text = element_text(size = 4), 
          legend.position = 'right', axis.text.x = element_text(angle = 45)) +
    labs(
      title = "Cumulative Moraltiy Rate\nfrom March - September 2020 by ZCTA",
      x = "Latitude",
      y = "Longitude", fill = "Mortality Rate\n (Deaths/100,000)"))  %>%
  layout(xaxis = list(autorange = TRUE),
         yaxis = list(autorange = TRUE))
```

### Proportion of SHSAT Offers in 2020 by ZCTA

```{r, echo = FALSE}
ggplotly(
  ggplot(covid_death_sdf1) +
    geom_sf(aes(fill = pro_offers)) +
    theme(legend.text = element_text(size = 4), 
          legend.position = 'right', axis.text.x = element_text(angle = 45)) +
    labs(
      title = "Proportion of SHSAT Offers in 2020 by ZCTA",
      x = "Latitude",
      y = "Longitude", fill = "Proportion of SHSAT Offers"))  %>%
  layout(xaxis = list(autorange = TRUE),
         yaxis = list(autorange = TRUE))
```